<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>WebRTC Client</title>
    <script src="qrc:///qtwebchannel/qwebchannel.js"></script>
    <style>
        body {
            margin: 0;
            padding: 0;
            overflow: hidden;
            width: 100%;
            height: 100vh;
            background: #000;
        }
        #media {
            width: 100%;
            height: 100%;
            position: relative;
        }
        video {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #000;
            position: absolute;
            top: 0;
            left: 0;
        }
    </style>
</head>
<body>
    <div id="media">
        <video id="video" autoplay playsinline muted></video>
        <audio id="audio" autoplay></audio>
    </div>
    <script>
        // 等待 WebChannel 初始化
        new QWebChannel(qt.webChannelTransport, function(channel) {
            window.webrtcBridge = channel.objects.m_pWebrtcBridge;
            console.log('WebChannel initialized');
        });
    </script>
    <script src="qrc:///view/webrtc/webrtc.js"></script>
</body>
</html> 
